package org.jpass.dc.business.user.dao;


import java.util.List;

import org.jpass.dc.business.user.bean.UserGroupVOBean;
import org.jpass.dc.common.dao.GenericDao;

@SuppressWarnings("rawtypes")
public class UserGroupDaoImpl extends GenericDao implements UserGroupDao {

	@SuppressWarnings("unchecked")
	public UserGroupDaoImpl() {
		super(UserGroupVOBean.class);
	}

	@SuppressWarnings("unchecked")
	public String addGroup(UserGroupVOBean voBean) throws Exception{
		this.save(voBean);
		return voBean.getId();
	}
	
	public UserGroupVOBean findGroupObjById(String groupId) throws Exception{
		return (UserGroupVOBean) this.queryById(groupId);
	}
	
	@SuppressWarnings("unchecked")
	public List<UserGroupVOBean> findGroupObjList() throws Exception{
		String hql="from UserGroupVOBean ";
		return this.findObjListByHql(hql);
	}
}
